home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / conqsrc.lha / Conquest / src / protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-03  |  3.1 KB  |  121 lines

  1. /* Prototypes for all the functions */
  2.  
  3. /* Combat.c */
  4. void playerattack(int starnum);
  5. void tf_battle(int starnum);
  6. void withdraw(int starnum, int plnum);
  7. void blast(tplanet *planet, int factors);
  8. void fire_salvo(tteam att_team, int tfnum, struct stplanet *planet, boolean first_time);
  9. boolean play_salvo(int starnum);
  10. void battle();
  11.  
  12. /* Commands.c */
  13. void blast_planet(); /* -> Combat */
  14. void inputplayer();
  15. void land();
  16. void quit();
  17. void send_tf();
  18. void inv_player(int x, int y, struct stplanet *planet);
  19.  
  20. /* Config.c */
  21. char *next_config_token(FILE *f);
  22. int get_config_value(char *text);
  23. int get_config_handle(char *text);
  24. bool read_config(char *filename);
  25.  
  26. /* Display.c */
  27. boolean display_forces(int ennum, int plnum, float *Enodds, float *Plodds);
  28. void disp_tf(struct sttf *taskf);
  29. void printmap();
  30. void print_col();
  31. void starsum();
  32. void tfsum();
  33. void clear_field();
  34. void clear_left();
  35. void clear_screen();
  36. void error(char *fmt, ...);
  37. void error_message();
  38. void print_tf(int i);
  39. void print_star(int stnum);
  40.  
  41. /* Enemy.c */
  42. boolean best_withdraw_plan(int Starnum, float odds);
  43. void enemy_attack(int starnum);
  44. void depart(int starnum);
  45. int eval_bc_col(struct stplanet *planet);
  46. int eval_t_col(struct stplanet *planet, float range);
  47. void inputmach();
  48. void move_bc(struct sttf *task, float slist[]);
  49. void send_transports(float slist[], struct sttf *task);
  50. /* Maybe this send4t has a meaning? */
  51. void send_t_tf(struct sttf *task, float slist[], int dest_star);
  52. void send_scouts(float slist[], struct sttf *task);
  53. boolean underdefended(int starnum);
  54. void wander_bc(struct sttf *task, float slist[]);
  55. void inv_enemy(int x, int y, struct stplanet *planet);
  56.  
  57. /* Init.c */
  58. void assign_planets(tstar *Ustar0, int starnum);
  59. void initconst();
  60. void init_player();
  61.  
  62. /* Input.c */
  63. char get_char();
  64. void get_line(char *iline);
  65. float dist(int star1, int star2);
  66. int get_stars(int s_star, float slist[]); /* -> utils? misc? */
  67. char get_token(char *line, int *Value);
  68.  
  69. /* Main.c */
  70. int main();
  71.  
  72. /* Misc.c */
  73. void help(int which);
  74. void on_board(int x, int y);
  75. void pause();
  76.  
  77. /* Movement.c */
  78. void lose_q(int *Ships, char typ, float percent);
  79. boolean lose(int *Ships, int typ, float percent); /* -> Combat */
  80. void move_ships();
  81. boolean set_des(int tf_num);
  82.  
  83. /* Research.c */
  84. void ressum();
  85. void print_res(char field);
  86. int research_limited(int team, char field, int max_amt);
  87. void research(int team, char field, int amt);
  88. void new_research();
  89.  
  90. /* Taskforce.c */
  91. void make_tf();
  92. int split_tf(int tf_num);
  93. void join_tf();
  94. int get_tf(tteam tm, int starnum);
  95. void joinsilent(tteam team, struct sttf *parent, struct sttf *child);
  96.  
  97. /* Update.c */
  98. void update_board(int x, int y, toption option);
  99. void up_year();
  100. void zero_tf(tteam tm, int tf_num);
  101. void check_game_over();
  102. void revolt(int starnum);
  103. void invest();
  104.  
  105. /* Utils.c */
  106. double fmin(double a, double b);
  107. void point(int col, int row);
  108. int rnd(int i);
  109. int round(float x);
  110. int min(int x1, int x2);
  111. int max(int x1, int x2);
  112. boolean any_bc(tteam team, int starnum);
  113. double fact(int k);
  114. void swap(int *a, int *b);
  115. int conv_bcd(int nibble, char byte);
  116.  
  117. /* Some other functions that we need */
  118. double exp();
  119. double log();
  120. double sqrt();
  121.